home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
wxwindem.zip
/
HELLO.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-18
|
3KB
|
88 lines
/*
* File: hello.h
* Purpose: Demo for wxWindows class library
*
* wxWindows 1.40
* Copyright (c) 1993 Artificial Intelligence Applications Institute,
* The University of Edinburgh
*
* Author: Julian Smart
* Date: 18-4-93
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice, author statement and this permission
* notice appear in all copies of this software and related documentation.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
* IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE
* UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF
* DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
* THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
// Define a new application
class MyApp: public wxApp
{
public:
wxFrame *OnInit(void);
};
// Define a new canvas which can receive some events
class MyCanvas: public wxCanvas
{
public:
MyCanvas(wxFrame *frame, int x, int y, int w, int h, int style = wxRETAINED);
void OnPaint(void);
void OnEvent(wxEvent& event);
void OnChar(int ch);
};
// Define a new frame
class MyFrame: public wxFrame
{
public:
wxPanel *panel;
wxTextWindow *text_window;
MyCanvas *canvas;
MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
void OnSize(int w, int h);
Bool OnClose(void);
void OnMenuCommand(int id);
void OnMenuSelect(int id);
void Draw(wxDC& dc, Bool draw_bitmaps = TRUE);
};
// Callbacks
void button_proc(wxButton& but, wxEvent& event);
void list_proc(wxListBox& list, wxEvent& event);
void GenericOk(wxButton& but, wxEvent& event);
// Timer
class MyTimer: public wxTimer
{
public:
void Notify(void);
};
#define HELLO_QUIT 100
#define HELLO_PRINT 101
#define HELLO_TWIPS 103
#define HELLO_METRIC 104
#define HELLO_LOMETRIC 105
#define HELLO_NORMAL 106
#define HELLO_ZOOM 107
#define HELLO_ABOUT 108
#define HELLO_TIMER_ON 109
#define HELLO_TIMER_OFF 110
#define HELLO_LOAD_FILE 111
#define HELLO_PRINT_EPS 112 // Windows-only option
#define HELLO_COPY_MF 113 // Windows-only option
#define HELLO_SCALE 114